<template>
  <div class="index">
    <!-- 二级路由对应组件的渲染出口 -->
    <!-- transition 动画组件 -->
    <transition name="fade" mode="out-in">
        <router-view></router-view>
    </transition>

    <!-- tabbar渲染 -->
    <MyTabbar />
  </div>
</template>

<script>
// 导入MyTabbar组件
import MyTabbar from '../components/MyTabbar.vue'

export default {
components:{
  // 注册
MyTabbar
}
}
</script>

<style lang="scss" scoped>
// 入场动画
.fade-enter {
  opacity: 0;

}

.fade-enter-active {
  transition: all 0.2s;
}

.fade-enter-to {
  opacity: 1;

}

// 离场动画
.fade-leave {
  opacity: 1;
}

.fade-leave-active {
  transition: all 0.2s;
}

.fade-leave-to {
  opacity: 0;

}
</style>
